const uuid = require('short-uuid')
const jwt = require('jsonwebtoken')

module.exports = {
    //生成唯一的id 
    getUuid() {
        return uuid.generate()
    },
    //生成 token值
    createToken(payload, secret, options) {
        return jwt.sign(payload, secret, options);
    }
}